/* 加载动画样式 */
.loading-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f1f0f0;
    border-radius: 10px;
    margin-bottom: 15px;
    max-width: 85%;
    align-self: flex-start;
}

.loading-dots {
    display: flex;
    margin-right: 10px;
}

.loading-dot {
    width: 8px;
    height: 8px;
    background-color: #4a76a8;
    border-radius: 50%;
    margin: 0 2px;
    animation: pulse 1.5s infinite ease-in-out;
}

.loading-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-text {
    color: #666;
    font-size: 14px;
}

/* 状态消息样式 */
.status-message {
    padding: 8px 15px;
    background: #e8f4fc;
    border-radius: 10px;
    margin-bottom: 15px;
    max-width: 85%;
    align-self: flex-start;
    border-left: 4px solid #3498db;
    font-size: 14px;
    color: #2c3e50;
}

.status-message.error {
    background: #fdecea;
    border-left-color: #e74c3c;
    color: #c0392b;
}

.status-message.success {
    background: #e8f6ef;
    border-left-color: #2ecc71;
    color: #27ae60;
}

/* 进度条样式 */
.progress-container {
    width: 100%;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4a76a8, #3498db);
    border-radius: 2px;
    animation: progressAnimation 2s infinite ease-in-out;
}

@keyframes progressAnimation {
    0% {
        width: 0%;
        margin-left: 0%;
    }
    50% {
        width: 70%;
        margin-left: 30%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* 打字动画效果 */
.typing-animation::after {
    content: "|";
    animation: blink 1s infinite step-end;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 禁用发送按钮时的样式 */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    .loading-indicator {
        background: #2d2d2d;
    }

    .loading-text {
        color: #aaa;
    }

    .status-message {
        background: #1e2a38;
        color: #e6e6e6;
    }
}